const app = require('express');
const router = app.Router();
var svgCaptcha = require('svg-captcha');
var loginController = require("../../controllers/user.controller");

router.get("/captcha",function(req, res, next){
    var captcha = svgCaptcha.create({
        width: 155,
        height: 40,
        noise: 2,
    });
    res.json({
        success:true,
        data:captcha
    })
})


router.post("/", loginController.loginVer);

module.exports = router;